

function loadPreviewImage(event) {
	var previewImage = document.getElementById('preview-image');
	var url = this.value;
	if (url) {
		previewImage.setAttribute('src', url);
	}
}

window.onload = function(event) {
	var urlEntry = document.getElementById('image-url');
	urlEntry.onblur = loadPreviewImage;
}